import request from '@/utils/request'
//获取一级类别
export const getCategoryOne = () => request({
    url: '/list-api/admin/product/getCategory1',
    method: 'get',
})
//获取二级类别
export const getCategoryTwo = (category1Id) => request({
    url: `/list-api/admin/product/getCategory2/${category1Id}`,
    method: 'get',
})
//获取三级类别
export const getCategoryThree = (category2Id) => request({
    url: `/list-api/admin/product/getCategory3/${category2Id}`,
    method: 'get',
})
// 获取商品列表
export const getProductList = ({ category1Id, category2Id, category3Id }) => request({
    url: `/list-api/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,
    method: 'get'
})
// 删除商品属性
export const deleteAttr = (attrId) => request({
    url: `/list-api/admin/product/deleteAttr/${attrId}`,
    method: 'delete'
})
// 添加商品属性
export const addAttr = (data) => request({
    url: `/list-api/admin/product/saveAttrInfo`,
    method: 'POST',
    data
})
//修改商品属性